package org.xiaov;

import org.xiaov.controller.UserController;
import org.xiaov.pojo.UserPO;
import xyz.riceball.context.ApplicationContext;
import xyz.riceball.context.ClassPathPropertiesApplicationContext;

import java.util.List;

/**
 * <p>
 *
 * </p>
 *
 * @author liuzhiqi
 * @since 2021/7/3 13:00
 */
public class Application {
    public static void main(String[] args) {
        ApplicationContext ac = new ClassPathPropertiesApplicationContext("application.properties");
        UserController bean = null;
        try {
            bean = ac.getBean(UserController.class);
        } catch (Exception e) {
            e.printStackTrace();
        }
        if (bean != null) {
            List<UserPO> userPOList = bean.findAll();
            System.out.println(userPOList);
        }
    }
}
